<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Events</title>
<meta name="generator" content="DocBook XSL Stylesheets V1.76.1">
<link rel="home" href="index.html" title="GDK 3 参考手册">
<link rel="up" href="reference.html" title="API参考">
<link rel="prev" href="gdk3-Windows.html" title="Windows">
<link rel="next" href="gdk3-Event-Structures.html" title="Event Structures">
<meta name="generator" content="GTK-Doc V1.17 (XML mode)">
<link rel="stylesheet" href="style.css" type="text/css">
</head>
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
<table class="navigation" id="top" width="100%" summary="Navigation header" cellpadding="2" cellspacing="2">
<tr valign="middle">
<td><a accesskey="p" href="gdk3-Windows.html"><img src="left.png" width="24" height="24" border="0" alt="Prev"></a></td>
<td><a accesskey="u" href="reference.html"><img src="up.png" width="24" height="24" border="0" alt="Up"></a></td>
<td><a accesskey="h" href="index.html"><img src="home.png" width="24" height="24" border="0" alt="Home"></a></td>
<th width="100%" align="center">GDK 3 参考手册</th>
<td><a accesskey="n" href="gdk3-Event-Structures.html"><img src="right.png" width="24" height="24" border="0" alt="Next"></a></td>
</tr>
<tr><td colspan="5" class="shortcuts">
<a href="#gdk3-Events.synopsis" class="shortcut">Top</a>
                   | 
                  <a href="#gdk3-Events.description" class="shortcut">Description</a>
</td></tr>
</table>
<div class="refentry">
<a name="gdk3-Events"></a><div class="titlepage"></div>
<div class="refnamediv"><table width="100%"><tr>
<td valign="top">
<h2><span class="refentrytitle"><a name="gdk3-Events.top_of_page"></a>Events</span></h2>
<p>Events — Functions for handling events from the window system</p>
</td>
<td valign="top" align="right"></td>
</tr></table></div>
<div class="refsynopsisdiv">
<a name="gdk3-Events.synopsis"></a><h2>Synopsis</h2>
<pre class="synopsis">
#include &lt;gdk/gdk.h&gt;

enum                <a class="link" href="gdk3-Events.html#GdkEventType" title="enum GdkEventType">GdkEventType</a>;
enum                <a class="link" href="gdk3-Events.html#GdkEventMask" title="enum GdkEventMask">GdkEventMask</a>;
#define             <a class="link" href="gdk3-Events.html#GDK-CURRENT-TIME:CAPS" title="GDK_CURRENT_TIME">GDK_CURRENT_TIME</a>
#define             <a class="link" href="gdk3-Events.html#GDK-PRIORITY-EVENTS:CAPS" title="GDK_PRIORITY_EVENTS">GDK_PRIORITY_EVENTS</a>
#define             <a class="link" href="gdk3-Events.html#GDK-PRIORITY-REDRAW:CAPS" title="GDK_PRIORITY_REDRAW">GDK_PRIORITY_REDRAW</a>

<a href="../glib/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>            <a class="link" href="gdk3-Events.html#gdk-events-pending" title="gdk_events_pending ()">gdk_events_pending</a>                  (<em class="parameter"><code><span class="type">void</span></code></em>);
<a class="link" href="gdk3-Event-Structures.html#GdkEvent" title="union GdkEvent"><span class="returnvalue">GdkEvent</span></a> *          <a class="link" href="gdk3-Events.html#gdk-event-peek" title="gdk_event_peek ()">gdk_event_peek</a>                      (<em class="parameter"><code><span class="type">void</span></code></em>);
<a class="link" href="gdk3-Event-Structures.html#GdkEvent" title="union GdkEvent"><span class="returnvalue">GdkEvent</span></a> *          <a class="link" href="gdk3-Events.html#gdk-event-get" title="gdk_event_get ()">gdk_event_get</a>                       (<em class="parameter"><code><span class="type">void</span></code></em>);
<span class="returnvalue">void</span>                <a class="link" href="gdk3-Events.html#gdk-event-put" title="gdk_event_put ()">gdk_event_put</a>                       (<em class="parameter"><code>const <a class="link" href="gdk3-Event-Structures.html#GdkEvent" title="union GdkEvent"><span class="type">GdkEvent</span></a> *event</code></em>);
<a class="link" href="gdk3-Event-Structures.html#GdkEvent" title="union GdkEvent"><span class="returnvalue">GdkEvent</span></a> *          <a class="link" href="gdk3-Events.html#gdk-event-new" title="gdk_event_new ()">gdk_event_new</a>                       (<em class="parameter"><code><a class="link" href="gdk3-Events.html#GdkEventType" title="enum GdkEventType"><span class="type">GdkEventType</span></a> type</code></em>);
<a class="link" href="gdk3-Event-Structures.html#GdkEvent" title="union GdkEvent"><span class="returnvalue">GdkEvent</span></a> *          <a class="link" href="gdk3-Events.html#gdk-event-copy" title="gdk_event_copy ()">gdk_event_copy</a>                      (<em class="parameter"><code>const <a class="link" href="gdk3-Event-Structures.html#GdkEvent" title="union GdkEvent"><span class="type">GdkEvent</span></a> *event</code></em>);
<span class="returnvalue">void</span>                <a class="link" href="gdk3-Events.html#gdk-event-free" title="gdk_event_free ()">gdk_event_free</a>                      (<em class="parameter"><code><a class="link" href="gdk3-Event-Structures.html#GdkEvent" title="union GdkEvent"><span class="type">GdkEvent</span></a> *event</code></em>);
<a href="../glib/glib-Basic-Types.html#guint32"><span class="returnvalue">guint32</span></a>             <a class="link" href="gdk3-Events.html#gdk-event-get-time" title="gdk_event_get_time ()">gdk_event_get_time</a>                  (<em class="parameter"><code>const <a class="link" href="gdk3-Event-Structures.html#GdkEvent" title="union GdkEvent"><span class="type">GdkEvent</span></a> *event</code></em>);
<a href="../glib/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>            <a class="link" href="gdk3-Events.html#gdk-event-get-state" title="gdk_event_get_state ()">gdk_event_get_state</a>                 (<em class="parameter"><code>const <a class="link" href="gdk3-Event-Structures.html#GdkEvent" title="union GdkEvent"><span class="type">GdkEvent</span></a> *event</code></em>,
                                                         <em class="parameter"><code><a class="link" href="gdk3-Windows.html#GdkModifierType" title="enum GdkModifierType"><span class="type">GdkModifierType</span></a> *state</code></em>);
<a href="../glib/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>            <a class="link" href="gdk3-Events.html#gdk-event-get-axis" title="gdk_event_get_axis ()">gdk_event_get_axis</a>                  (<em class="parameter"><code>const <a class="link" href="gdk3-Event-Structures.html#GdkEvent" title="union GdkEvent"><span class="type">GdkEvent</span></a> *event</code></em>,
                                                         <em class="parameter"><code><a class="link" href="gdk3-GdkDevice.html#GdkAxisUse" title="enum GdkAxisUse"><span class="type">GdkAxisUse</span></a> axis_use</code></em>,
                                                         <em class="parameter"><code><a href="../glib/glib-Basic-Types.html#gdouble"><span class="type">gdouble</span></a> *value</code></em>);
<a href="../glib/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>            <a class="link" href="gdk3-Events.html#gdk-event-get-coords" title="gdk_event_get_coords ()">gdk_event_get_coords</a>                (<em class="parameter"><code>const <a class="link" href="gdk3-Event-Structures.html#GdkEvent" title="union GdkEvent"><span class="type">GdkEvent</span></a> *event</code></em>,
                                                         <em class="parameter"><code><a href="../glib/glib-Basic-Types.html#gdouble"><span class="type">gdouble</span></a> *x_win</code></em>,
                                                         <em class="parameter"><code><a href="../glib/glib-Basic-Types.html#gdouble"><span class="type">gdouble</span></a> *y_win</code></em>);
<a href="../glib/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>            <a class="link" href="gdk3-Events.html#gdk-event-get-root-coords" title="gdk_event_get_root_coords ()">gdk_event_get_root_coords</a>           (<em class="parameter"><code>const <a class="link" href="gdk3-Event-Structures.html#GdkEvent" title="union GdkEvent"><span class="type">GdkEvent</span></a> *event</code></em>,
                                                         <em class="parameter"><code><a href="../glib/glib-Basic-Types.html#gdouble"><span class="type">gdouble</span></a> *x_root</code></em>,
                                                         <em class="parameter"><code><a href="../glib/glib-Basic-Types.html#gdouble"><span class="type">gdouble</span></a> *y_root</code></em>);
<span class="returnvalue">void</span>                <a class="link" href="gdk3-Events.html#gdk-event-request-motions" title="gdk_event_request_motions ()">gdk_event_request_motions</a>           (<em class="parameter"><code>const <a class="link" href="gdk3-Event-Structures.html#GdkEventMotion" title="struct GdkEventMotion"><span class="type">GdkEventMotion</span></a> *event</code></em>);
<a href="../glib/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>            <a class="link" href="gdk3-Events.html#gdk-events-get-angle" title="gdk_events_get_angle ()">gdk_events_get_angle</a>                (<em class="parameter"><code><a class="link" href="gdk3-Event-Structures.html#GdkEvent" title="union GdkEvent"><span class="type">GdkEvent</span></a> *event1</code></em>,
                                                         <em class="parameter"><code><a class="link" href="gdk3-Event-Structures.html#GdkEvent" title="union GdkEvent"><span class="type">GdkEvent</span></a> *event2</code></em>,
                                                         <em class="parameter"><code><a href="../glib/glib-Basic-Types.html#gdouble"><span class="type">gdouble</span></a> *angle</code></em>);
<a href="../glib/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>            <a class="link" href="gdk3-Events.html#gdk-events-get-center" title="gdk_events_get_center ()">gdk_events_get_center</a>               (<em class="parameter"><code><a class="link" href="gdk3-Event-Structures.html#GdkEvent" title="union GdkEvent"><span class="type">GdkEvent</span></a> *event1</code></em>,
                                                         <em class="parameter"><code><a class="link" href="gdk3-Event-Structures.html#GdkEvent" title="union GdkEvent"><span class="type">GdkEvent</span></a> *event2</code></em>,
                                                         <em class="parameter"><code><a href="../glib/glib-Basic-Types.html#gdouble"><span class="type">gdouble</span></a> *x</code></em>,
                                                         <em class="parameter"><code><a href="../glib/glib-Basic-Types.html#gdouble"><span class="type">gdouble</span></a> *y</code></em>);
<a href="../glib/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>            <a class="link" href="gdk3-Events.html#gdk-events-get-distance" title="gdk_events_get_distance ()">gdk_events_get_distance</a>             (<em class="parameter"><code><a class="link" href="gdk3-Event-Structures.html#GdkEvent" title="union GdkEvent"><span class="type">GdkEvent</span></a> *event1</code></em>,
                                                         <em class="parameter"><code><a class="link" href="gdk3-Event-Structures.html#GdkEvent" title="union GdkEvent"><span class="type">GdkEvent</span></a> *event2</code></em>,
                                                         <em class="parameter"><code><a href="../glib/glib-Basic-Types.html#gdouble"><span class="type">gdouble</span></a> *distance</code></em>);

<span class="returnvalue">void</span>                <a class="link" href="gdk3-Events.html#gdk-event-handler-set" title="gdk_event_handler_set ()">gdk_event_handler_set</a>               (<em class="parameter"><code><a class="link" href="gdk3-Events.html#GdkEventFunc" title="GdkEventFunc ()"><span class="type">GdkEventFunc</span></a> func</code></em>,
                                                         <em class="parameter"><code><a href="../glib/glib-Basic-Types.html#gpointer"><span class="type">gpointer</span></a> data</code></em>,
                                                         <em class="parameter"><code><a href="../glib/glib-Datasets.html#GDestroyNotify"><span class="type">GDestroyNotify</span></a> notify</code></em>);
<span class="returnvalue">void</span>                (<a class="link" href="gdk3-Events.html#GdkEventFunc" title="GdkEventFunc ()">*GdkEventFunc</a>)                     (<em class="parameter"><code><a class="link" href="gdk3-Event-Structures.html#GdkEvent" title="union GdkEvent"><span class="type">GdkEvent</span></a> *event</code></em>,
                                                         <em class="parameter"><code><a href="../glib/glib-Basic-Types.html#gpointer"><span class="type">gpointer</span></a> data</code></em>);

<a href="../glib/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>            <a class="link" href="gdk3-Events.html#gdk-get-show-events" title="gdk_get_show_events ()">gdk_get_show_events</a>                 (<em class="parameter"><code><span class="type">void</span></code></em>);
<span class="returnvalue">void</span>                <a class="link" href="gdk3-Events.html#gdk-set-show-events" title="gdk_set_show_events ()">gdk_set_show_events</a>                 (<em class="parameter"><code><a href="../glib/glib-Basic-Types.html#gboolean"><span class="type">gboolean</span></a> show_events</code></em>);
<span class="returnvalue">void</span>                <a class="link" href="gdk3-Events.html#gdk-event-set-screen" title="gdk_event_set_screen ()">gdk_event_set_screen</a>                (<em class="parameter"><code><a class="link" href="gdk3-Event-Structures.html#GdkEvent" title="union GdkEvent"><span class="type">GdkEvent</span></a> *event</code></em>,
                                                         <em class="parameter"><code><a class="link" href="gdk3-GdkScreen.html#GdkScreen" title="GdkScreen"><span class="type">GdkScreen</span></a> *screen</code></em>);
<a class="link" href="gdk3-GdkScreen.html#GdkScreen" title="GdkScreen"><span class="returnvalue">GdkScreen</span></a> *         <a class="link" href="gdk3-Events.html#gdk-event-get-screen" title="gdk_event_get_screen ()">gdk_event_get_screen</a>                (<em class="parameter"><code>const <a class="link" href="gdk3-Event-Structures.html#GdkEvent" title="union GdkEvent"><span class="type">GdkEvent</span></a> *event</code></em>);
<a class="link" href="gdk3-GdkDevice.html#GdkDevice" title="GdkDevice"><span class="returnvalue">GdkDevice</span></a> *         <a class="link" href="gdk3-Events.html#gdk-event-get-device" title="gdk_event_get_device ()">gdk_event_get_device</a>                (<em class="parameter"><code>const <a class="link" href="gdk3-Event-Structures.html#GdkEvent" title="union GdkEvent"><span class="type">GdkEvent</span></a> *event</code></em>);
<span class="returnvalue">void</span>                <a class="link" href="gdk3-Events.html#gdk-event-set-device" title="gdk_event_set_device ()">gdk_event_set_device</a>                (<em class="parameter"><code><a class="link" href="gdk3-Event-Structures.html#GdkEvent" title="union GdkEvent"><span class="type">GdkEvent</span></a> *event</code></em>,
                                                         <em class="parameter"><code><a class="link" href="gdk3-GdkDevice.html#GdkDevice" title="GdkDevice"><span class="type">GdkDevice</span></a> *device</code></em>);
<a class="link" href="gdk3-GdkDevice.html#GdkDevice" title="GdkDevice"><span class="returnvalue">GdkDevice</span></a> *         <a class="link" href="gdk3-Events.html#gdk-event-get-source-device" title="gdk_event_get_source_device ()">gdk_event_get_source_device</a>         (<em class="parameter"><code>const <a class="link" href="gdk3-Event-Structures.html#GdkEvent" title="union GdkEvent"><span class="type">GdkEvent</span></a> *event</code></em>);
<span class="returnvalue">void</span>                <a class="link" href="gdk3-Events.html#gdk-event-set-source-device" title="gdk_event_set_source_device ()">gdk_event_set_source_device</a>         (<em class="parameter"><code><a class="link" href="gdk3-Event-Structures.html#GdkEvent" title="union GdkEvent"><span class="type">GdkEvent</span></a> *event</code></em>,
                                                         <em class="parameter"><code><a class="link" href="gdk3-GdkDevice.html#GdkDevice" title="GdkDevice"><span class="type">GdkDevice</span></a> *device</code></em>);

<a href="../glib/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>            <a class="link" href="gdk3-Events.html#gdk-setting-get" title="gdk_setting_get ()">gdk_setting_get</a>                     (<em class="parameter"><code>const <a href="../glib/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *name</code></em>,
                                                         <em class="parameter"><code><a href="../gobject/gobject-Generic-values.html#GValue"><span class="type">GValue</span></a> *value</code></em>);
</pre>
</div>
<div class="refsect1">
<a name="gdk3-Events.description"></a><h2>Description</h2>
<p>
This section describes functions dealing with events from the window
system.
</p>
<p>
In GTK+ applications the events are handled automatically in
<code class="function">gtk_main_do_event()</code> and passed on to the appropriate widgets, so these
functions are rarely needed. Though some of the fields in the
Event Structures are useful.
</p>
</div>
<div class="refsect1">
<a name="gdk3-Events.details"></a><h2>Details</h2>
<div class="refsect2">
<a name="GdkEventType"></a><h3>enum GdkEventType</h3>
<pre class="programlisting">typedef enum
{
  GDK_NOTHING		= -1,
  GDK_DELETE		= 0,
  GDK_DESTROY		= 1,
  GDK_EXPOSE		= 2,
  GDK_MOTION_NOTIFY = 3,
  GDK_BUTTON_PRESS = 4,
  GDK_2BUTTON_PRESS = 5,
  GDK_3BUTTON_PRESS = 6,
  GDK_BUTTON_RELEASE = 7,
  GDK_KEY_PRESS		= 8,
  GDK_KEY_RELEASE = 9,
  GDK_ENTER_NOTIFY = 10,
  GDK_LEAVE_NOTIFY = 11,
  GDK_FOCUS_CHANGE = 12,
  GDK_CONFIGURE		= 13,
  GDK_MAP		= 14,
  GDK_UNMAP		= 15,
  GDK_PROPERTY_NOTIFY = 16,
  GDK_SELECTION_CLEAR = 17,
  GDK_SELECTION_REQUEST = 18,
  GDK_SELECTION_NOTIFY = 19,
  GDK_PROXIMITY_IN = 20,
  GDK_PROXIMITY_OUT = 21,
  GDK_DRAG_ENTER        = 22,
  GDK_DRAG_LEAVE        = 23,
  GDK_DRAG_MOTION       = 24,
  GDK_DRAG_STATUS       = 25,
  GDK_DROP_START        = 26,
  GDK_DROP_FINISHED     = 27,
  GDK_CLIENT_EVENT = 28,
  GDK_VISIBILITY_NOTIFY = 29,
  GDK_SCROLL            = 31,
  GDK_WINDOW_STATE      = 32,
  GDK_SETTING           = 33,
  GDK_OWNER_CHANGE      = 34,
  GDK_GRAB_BROKEN       = 35,
  GDK_DAMAGE            = 36,
  GDK_EVENT_LAST        /* helper variable for decls */
} GdkEventType;
</pre>
<p>
Specifies the type of the event.
</p>
<p>
Do not confuse these events with the signals that GTK+ widgets emit.
Although many of these events result in corresponding signals being emitted,
the events are often transformed or filtered along the way.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><a name="GDK-NOTHING:CAPS"></a><span class="term"><code class="literal">GDK_NOTHING</code></span></p></td>
<td>a special code to indicate a null event.
</td>
</tr>
<tr>
<td><p><a name="GDK-DELETE:CAPS"></a><span class="term"><code class="literal">GDK_DELETE</code></span></p></td>
<td>the window manager has requested that the toplevel window be
  hidden or destroyed, usually when the user clicks on a special icon in the
  title bar.
</td>
</tr>
<tr>
<td><p><a name="GDK-DESTROY:CAPS"></a><span class="term"><code class="literal">GDK_DESTROY</code></span></p></td>
<td>the window has been destroyed.
</td>
</tr>
<tr>
<td><p><a name="GDK-EXPOSE:CAPS"></a><span class="term"><code class="literal">GDK_EXPOSE</code></span></p></td>
<td>all or part of the window has become visible and needs to be
  redrawn.
</td>
</tr>
<tr>
<td><p><a name="GDK-MOTION-NOTIFY:CAPS"></a><span class="term"><code class="literal">GDK_MOTION_NOTIFY</code></span></p></td>
<td>the pointer (usually a mouse) has moved.
</td>
</tr>
<tr>
<td><p><a name="GDK-BUTTON-PRESS:CAPS"></a><span class="term"><code class="literal">GDK_BUTTON_PRESS</code></span></p></td>
<td>a mouse button has been pressed.
</td>
</tr>
<tr>
<td><p><a name="GDK-2BUTTON-PRESS:CAPS"></a><span class="term"><code class="literal">GDK_2BUTTON_PRESS</code></span></p></td>
<td>a mouse button has been double-clicked (clicked twice
  within a short period of time). Note that each click also generates a
  <a class="link" href="gdk3-Events.html#GDK-BUTTON-PRESS:CAPS"><code class="literal">GDK_BUTTON_PRESS</code></a> event.
</td>
</tr>
<tr>
<td><p><a name="GDK-3BUTTON-PRESS:CAPS"></a><span class="term"><code class="literal">GDK_3BUTTON_PRESS</code></span></p></td>
<td>a mouse button has been clicked 3 times in a short period
  of time. Note that each click also generates a <a class="link" href="gdk3-Events.html#GDK-BUTTON-PRESS:CAPS"><code class="literal">GDK_BUTTON_PRESS</code></a> event.
</td>
</tr>
<tr>
<td><p><a name="GDK-BUTTON-RELEASE:CAPS"></a><span class="term"><code class="literal">GDK_BUTTON_RELEASE</code></span></p></td>
<td>a mouse button has been released.
</td>
</tr>
<tr>
<td><p><a name="GDK-KEY-PRESS:CAPS"></a><span class="term"><code class="literal">GDK_KEY_PRESS</code></span></p></td>
<td>a key has been pressed.
</td>
</tr>
<tr>
<td><p><a name="GDK-KEY-RELEASE:CAPS"></a><span class="term"><code class="literal">GDK_KEY_RELEASE</code></span></p></td>
<td>a key has been released.
</td>
</tr>
<tr>
<td><p><a name="GDK-ENTER-NOTIFY:CAPS"></a><span class="term"><code class="literal">GDK_ENTER_NOTIFY</code></span></p></td>
<td>the pointer has entered the window.
</td>
</tr>
<tr>
<td><p><a name="GDK-LEAVE-NOTIFY:CAPS"></a><span class="term"><code class="literal">GDK_LEAVE_NOTIFY</code></span></p></td>
<td>the pointer has left the window.
</td>
</tr>
<tr>
<td><p><a name="GDK-FOCUS-CHANGE:CAPS"></a><span class="term"><code class="literal">GDK_FOCUS_CHANGE</code></span></p></td>
<td>the keyboard focus has entered or left the window.
</td>
</tr>
<tr>
<td><p><a name="GDK-CONFIGURE:CAPS"></a><span class="term"><code class="literal">GDK_CONFIGURE</code></span></p></td>
<td>the size, position or stacking order of the window has changed.
  Note that GTK+ discards these events for <a class="link" href="gdk3-Windows.html#GDK-WINDOW-CHILD:CAPS"><code class="literal">GDK_WINDOW_CHILD</code></a> windows.
</td>
</tr>
<tr>
<td><p><a name="GDK-MAP:CAPS"></a><span class="term"><code class="literal">GDK_MAP</code></span></p></td>
<td>the window has been mapped.
</td>
</tr>
<tr>
<td><p><a name="GDK-UNMAP:CAPS"></a><span class="term"><code class="literal">GDK_UNMAP</code></span></p></td>
<td>the window has been unmapped.
</td>
</tr>
<tr>
<td><p><a name="GDK-PROPERTY-NOTIFY:CAPS"></a><span class="term"><code class="literal">GDK_PROPERTY_NOTIFY</code></span></p></td>
<td>a property on the window has been changed or deleted.
</td>
</tr>
<tr>
<td><p><a name="GDK-SELECTION-CLEAR:CAPS"></a><span class="term"><code class="literal">GDK_SELECTION_CLEAR</code></span></p></td>
<td>the application has lost ownership of a selection.
</td>
</tr>
<tr>
<td><p><a name="GDK-SELECTION-REQUEST:CAPS"></a><span class="term"><code class="literal">GDK_SELECTION_REQUEST</code></span></p></td>
<td>another application has requested a selection.
</td>
</tr>
<tr>
<td><p><a name="GDK-SELECTION-NOTIFY:CAPS"></a><span class="term"><code class="literal">GDK_SELECTION_NOTIFY</code></span></p></td>
<td>a selection has been received.
</td>
</tr>
<tr>
<td><p><a name="GDK-PROXIMITY-IN:CAPS"></a><span class="term"><code class="literal">GDK_PROXIMITY_IN</code></span></p></td>
<td>an input device has moved into contact with a sensing
  surface (e.g. a touchscreen or graphics tablet).
</td>
</tr>
<tr>
<td><p><a name="GDK-PROXIMITY-OUT:CAPS"></a><span class="term"><code class="literal">GDK_PROXIMITY_OUT</code></span></p></td>
<td>an input device has moved out of contact with a sensing
  surface.
</td>
</tr>
<tr>
<td><p><a name="GDK-DRAG-ENTER:CAPS"></a><span class="term"><code class="literal">GDK_DRAG_ENTER</code></span></p></td>
<td>the mouse has entered the window while a drag is in progress.
</td>
</tr>
<tr>
<td><p><a name="GDK-DRAG-LEAVE:CAPS"></a><span class="term"><code class="literal">GDK_DRAG_LEAVE</code></span></p></td>
<td>the mouse has left the window while a drag is in progress.
</td>
</tr>
<tr>
<td><p><a name="GDK-DRAG-MOTION:CAPS"></a><span class="term"><code class="literal">GDK_DRAG_MOTION</code></span></p></td>
<td>the mouse has moved in the window while a drag is in
  progress.
</td>
</tr>
<tr>
<td><p><a name="GDK-DRAG-STATUS:CAPS"></a><span class="term"><code class="literal">GDK_DRAG_STATUS</code></span></p></td>
<td>the status of the drag operation initiated by the window
  has changed.
</td>
</tr>
<tr>
<td><p><a name="GDK-DROP-START:CAPS"></a><span class="term"><code class="literal">GDK_DROP_START</code></span></p></td>
<td>a drop operation onto the window has started.
</td>
</tr>
<tr>
<td><p><a name="GDK-DROP-FINISHED:CAPS"></a><span class="term"><code class="literal">GDK_DROP_FINISHED</code></span></p></td>
<td>the drop operation initiated by the window has completed.
</td>
</tr>
<tr>
<td><p><a name="GDK-CLIENT-EVENT:CAPS"></a><span class="term"><code class="literal">GDK_CLIENT_EVENT</code></span></p></td>
<td>a message has been received from another application.
</td>
</tr>
<tr>
<td><p><a name="GDK-VISIBILITY-NOTIFY:CAPS"></a><span class="term"><code class="literal">GDK_VISIBILITY_NOTIFY</code></span></p></td>
<td>the window visibility status has changed.
</td>
</tr>
<tr>
<td><p><a name="GDK-SCROLL:CAPS"></a><span class="term"><code class="literal">GDK_SCROLL</code></span></p></td>
<td>the scroll wheel was turned
</td>
</tr>
<tr>
<td><p><a name="GDK-WINDOW-STATE:CAPS"></a><span class="term"><code class="literal">GDK_WINDOW_STATE</code></span></p></td>
<td>the state of a window has changed. See <a class="link" href="gdk3-Event-Structures.html#GdkWindowState" title="enum GdkWindowState"><span class="type">GdkWindowState</span></a>
  for the possible window states
</td>
</tr>
<tr>
<td><p><a name="GDK-SETTING:CAPS"></a><span class="term"><code class="literal">GDK_SETTING</code></span></p></td>
<td>a setting has been modified.
</td>
</tr>
<tr>
<td><p><a name="GDK-OWNER-CHANGE:CAPS"></a><span class="term"><code class="literal">GDK_OWNER_CHANGE</code></span></p></td>
<td>the owner of a selection has changed. This event type
  was added in 2.6
</td>
</tr>
<tr>
<td><p><a name="GDK-GRAB-BROKEN:CAPS"></a><span class="term"><code class="literal">GDK_GRAB_BROKEN</code></span></p></td>
<td>a pointer or keyboard grab was broken. This event type
  was added in 2.8.
</td>
</tr>
<tr>
<td><p><a name="GDK-DAMAGE:CAPS"></a><span class="term"><code class="literal">GDK_DAMAGE</code></span></p></td>
<td>the content of the window has been changed. This event type
  was added in 2.14.
</td>
</tr>
<tr>
<td><p><a name="GDK-EVENT-LAST:CAPS"></a><span class="term"><code class="literal">GDK_EVENT_LAST</code></span></p></td>
<td>marks the end of the GdkEventType enumeration. Added in 2.18
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2">
<a name="GdkEventMask"></a><h3>enum GdkEventMask</h3>
<pre class="programlisting">typedef enum
{
  GDK_EXPOSURE_MASK             = 1 &lt;&lt; 1,
  GDK_POINTER_MOTION_MASK       = 1 &lt;&lt; 2,
  GDK_POINTER_MOTION_HINT_MASK  = 1 &lt;&lt; 3,
  GDK_BUTTON_MOTION_MASK        = 1 &lt;&lt; 4,
  GDK_BUTTON1_MOTION_MASK       = 1 &lt;&lt; 5,
  GDK_BUTTON2_MOTION_MASK       = 1 &lt;&lt; 6,
  GDK_BUTTON3_MOTION_MASK       = 1 &lt;&lt; 7,
  GDK_BUTTON_PRESS_MASK         = 1 &lt;&lt; 8,
  GDK_BUTTON_RELEASE_MASK       = 1 &lt;&lt; 9,
  GDK_KEY_PRESS_MASK            = 1 &lt;&lt; 10,
  GDK_KEY_RELEASE_MASK          = 1 &lt;&lt; 11,
  GDK_ENTER_NOTIFY_MASK         = 1 &lt;&lt; 12,
  GDK_LEAVE_NOTIFY_MASK         = 1 &lt;&lt; 13,
  GDK_FOCUS_CHANGE_MASK         = 1 &lt;&lt; 14,
  GDK_STRUCTURE_MASK            = 1 &lt;&lt; 15,
  GDK_PROPERTY_CHANGE_MASK      = 1 &lt;&lt; 16,
  GDK_VISIBILITY_NOTIFY_MASK    = 1 &lt;&lt; 17,
  GDK_PROXIMITY_IN_MASK         = 1 &lt;&lt; 18,
  GDK_PROXIMITY_OUT_MASK        = 1 &lt;&lt; 19,
  GDK_SUBSTRUCTURE_MASK         = 1 &lt;&lt; 20,
  GDK_SCROLL_MASK               = 1 &lt;&lt; 21,
  GDK_ALL_EVENTS_MASK           = 0x3FFFFE
} GdkEventMask;
</pre>
<p>
A set of bit-flags to indicate which events a window is to receive.
Most of these masks map onto one or more of the <a class="link" href="gdk3-Events.html#GdkEventType" title="enum GdkEventType"><span class="type">GdkEventType</span></a> event types
above.
</p>
<p>
<a class="link" href="gdk3-Events.html#GDK-POINTER-MOTION-HINT-MASK:CAPS"><code class="literal">GDK_POINTER_MOTION_HINT_MASK</code></a> is a special mask which is used to reduce the
number of <a class="link" href="gdk3-Events.html#GDK-MOTION-NOTIFY:CAPS"><code class="literal">GDK_MOTION_NOTIFY</code></a> events received. Normally a <a class="link" href="gdk3-Events.html#GDK-MOTION-NOTIFY:CAPS"><code class="literal">GDK_MOTION_NOTIFY</code></a>
event is received each time the mouse moves. However, if the application
spends a lot of time processing the event (updating the display, for example),
it can lag behind the position of the mouse. When using
<a class="link" href="gdk3-Events.html#GDK-POINTER-MOTION-HINT-MASK:CAPS"><code class="literal">GDK_POINTER_MOTION_HINT_MASK</code></a>, fewer <a class="link" href="gdk3-Events.html#GDK-MOTION-NOTIFY:CAPS"><code class="literal">GDK_MOTION_NOTIFY</code></a> events will be sent,
some of which are marked as a hint (the is_hint member is <a href="../glib/glib-Standard-Macros.html#TRUE:CAPS"><code class="literal">TRUE</code></a>).
To receive more motion events after a motion hint event, the application
needs to asks for more, by calling <a class="link" href="gdk3-Events.html#gdk-event-request-motions" title="gdk_event_request_motions ()"><code class="function">gdk_event_request_motions()</code></a>.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><a name="GDK-EXPOSURE-MASK:CAPS"></a><span class="term"><code class="literal">GDK_EXPOSURE_MASK</code></span></p></td>
<td>receive expose events
</td>
</tr>
<tr>
<td><p><a name="GDK-POINTER-MOTION-MASK:CAPS"></a><span class="term"><code class="literal">GDK_POINTER_MOTION_MASK</code></span></p></td>
<td>receive all pointer motion events
</td>
</tr>
<tr>
<td><p><a name="GDK-POINTER-MOTION-HINT-MASK:CAPS"></a><span class="term"><code class="literal">GDK_POINTER_MOTION_HINT_MASK</code></span></p></td>
<td>see the explanation above
</td>
</tr>
<tr>
<td><p><a name="GDK-BUTTON-MOTION-MASK:CAPS"></a><span class="term"><code class="literal">GDK_BUTTON_MOTION_MASK</code></span></p></td>
<td>receive pointer motion events while any button is pressed
</td>
</tr>
<tr>
<td><p><a name="GDK-BUTTON1-MOTION-MASK:CAPS"></a><span class="term"><code class="literal">GDK_BUTTON1_MOTION_MASK</code></span></p></td>
<td>receive pointer motion events while 1 button is pressed
</td>
</tr>
<tr>
<td><p><a name="GDK-BUTTON2-MOTION-MASK:CAPS"></a><span class="term"><code class="literal">GDK_BUTTON2_MOTION_MASK</code></span></p></td>
<td>receive pointer motion events while 2 button is pressed
</td>
</tr>
<tr>
<td><p><a name="GDK-BUTTON3-MOTION-MASK:CAPS"></a><span class="term"><code class="literal">GDK_BUTTON3_MOTION_MASK</code></span></p></td>
<td>receive pointer motion events while 3 button is pressed
</td>
</tr>
<tr>
<td><p><a name="GDK-BUTTON-PRESS-MASK:CAPS"></a><span class="term"><code class="literal">GDK_BUTTON_PRESS_MASK</code></span></p></td>
<td>receive button press events
</td>
</tr>
<tr>
<td><p><a name="GDK-BUTTON-RELEASE-MASK:CAPS"></a><span class="term"><code class="literal">GDK_BUTTON_RELEASE_MASK</code></span></p></td>
<td>receive button release events
</td>
</tr>
<tr>
<td><p><a name="GDK-KEY-PRESS-MASK:CAPS"></a><span class="term"><code class="literal">GDK_KEY_PRESS_MASK</code></span></p></td>
<td>receive key press events
</td>
</tr>
<tr>
<td><p><a name="GDK-KEY-RELEASE-MASK:CAPS"></a><span class="term"><code class="literal">GDK_KEY_RELEASE_MASK</code></span></p></td>
<td>receive key release events
</td>
</tr>
<tr>
<td><p><a name="GDK-ENTER-NOTIFY-MASK:CAPS"></a><span class="term"><code class="literal">GDK_ENTER_NOTIFY_MASK</code></span></p></td>
<td>receive window enter events
</td>
</tr>
<tr>
<td><p><a name="GDK-LEAVE-NOTIFY-MASK:CAPS"></a><span class="term"><code class="literal">GDK_LEAVE_NOTIFY_MASK</code></span></p></td>
<td>receive window leave events
</td>
</tr>
<tr>
<td><p><a name="GDK-FOCUS-CHANGE-MASK:CAPS"></a><span class="term"><code class="literal">GDK_FOCUS_CHANGE_MASK</code></span></p></td>
<td>receive focus change events
</td>
</tr>
<tr>
<td><p><a name="GDK-STRUCTURE-MASK:CAPS"></a><span class="term"><code class="literal">GDK_STRUCTURE_MASK</code></span></p></td>
<td>receive events about window configuration change
</td>
</tr>
<tr>
<td><p><a name="GDK-PROPERTY-CHANGE-MASK:CAPS"></a><span class="term"><code class="literal">GDK_PROPERTY_CHANGE_MASK</code></span></p></td>
<td>receive property change events
</td>
</tr>
<tr>
<td><p><a name="GDK-VISIBILITY-NOTIFY-MASK:CAPS"></a><span class="term"><code class="literal">GDK_VISIBILITY_NOTIFY_MASK</code></span></p></td>
<td>receive visibility change events
</td>
</tr>
<tr>
<td><p><a name="GDK-PROXIMITY-IN-MASK:CAPS"></a><span class="term"><code class="literal">GDK_PROXIMITY_IN_MASK</code></span></p></td>
<td>receive proximity in events
</td>
</tr>
<tr>
<td><p><a name="GDK-PROXIMITY-OUT-MASK:CAPS"></a><span class="term"><code class="literal">GDK_PROXIMITY_OUT_MASK</code></span></p></td>
<td>receive proximity out events
</td>
</tr>
<tr>
<td><p><a name="GDK-SUBSTRUCTURE-MASK:CAPS"></a><span class="term"><code class="literal">GDK_SUBSTRUCTURE_MASK</code></span></p></td>
<td>receive events about window configuration changes of
  child windows
</td>
</tr>
<tr>
<td><p><a name="GDK-SCROLL-MASK:CAPS"></a><span class="term"><code class="literal">GDK_SCROLL_MASK</code></span></p></td>
<td>receive scroll events
</td>
</tr>
<tr>
<td><p><a name="GDK-ALL-EVENTS-MASK:CAPS"></a><span class="term"><code class="literal">GDK_ALL_EVENTS_MASK</code></span></p></td>
<td>the combination of all the above event masks.
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2">
<a name="GDK-CURRENT-TIME:CAPS"></a><h3>GDK_CURRENT_TIME</h3>
<pre class="programlisting">#define GDK_CURRENT_TIME     0L
</pre>
<p>
Represents the current time, and can be used anywhere a time is expected.
</p>
</div>
<hr>
<div class="refsect2">
<a name="GDK-PRIORITY-EVENTS:CAPS"></a><h3>GDK_PRIORITY_EVENTS</h3>
<pre class="programlisting">#define             GDK_PRIORITY_EVENTS</pre>
<p>
This is the priority that events from the X server are given in the
<a href="../glib/glib-The-Main-Event-Loop.html">GLib Main Loop</a>.
</p>
</div>
<hr>
<div class="refsect2">
<a name="GDK-PRIORITY-REDRAW:CAPS"></a><h3>GDK_PRIORITY_REDRAW</h3>
<pre class="programlisting">#define GDK_PRIORITY_REDRAW     (G_PRIORITY_HIGH_IDLE + 20)
</pre>
<p>
This is the priority that the idle handler processing window updates
is given in the
<a href="../glib/glib-The-Main-Event-Loop.html">GLib Main Loop</a>.
</p>
</div>
<hr>
<div class="refsect2">
<a name="gdk-events-pending"></a><h3>gdk_events_pending ()</h3>
<pre class="programlisting"><a href="../glib/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>            gdk_events_pending                  (<em class="parameter"><code><span class="type">void</span></code></em>);</pre>
<p>
Checks if any events are ready to be processed for any display.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody><tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td>
<a href="../glib/glib-Standard-Macros.html#TRUE:CAPS"><code class="literal">TRUE</code></a> if any events are pending.</td>
</tr></tbody>
</table></div>
</div>
<hr>
<div class="refsect2">
<a name="gdk-event-peek"></a><h3>gdk_event_peek ()</h3>
<pre class="programlisting"><a class="link" href="gdk3-Event-Structures.html#GdkEvent" title="union GdkEvent"><span class="returnvalue">GdkEvent</span></a> *          gdk_event_peek                      (<em class="parameter"><code><span class="type">void</span></code></em>);</pre>
<p>
If there is an event waiting in the event queue of some open
display, returns a copy of it. See <a class="link" href="gdk3-GdkDisplay.html#gdk-display-peek-event" title="gdk_display_peek_event ()"><code class="function">gdk_display_peek_event()</code></a>.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody><tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td>a copy of the first <a class="link" href="gdk3-Event-Structures.html#GdkEvent" title="union GdkEvent"><span class="type">GdkEvent</span></a> on some event queue, or <a href="../glib/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a> if no
events are in any queues. The returned <a class="link" href="gdk3-Event-Structures.html#GdkEvent" title="union GdkEvent"><span class="type">GdkEvent</span></a> should be freed with
<a class="link" href="gdk3-Events.html#gdk-event-free" title="gdk_event_free ()"><code class="function">gdk_event_free()</code></a>.</td>
</tr></tbody>
</table></div>
</div>
<hr>
<div class="refsect2">
<a name="gdk-event-get"></a><h3>gdk_event_get ()</h3>
<pre class="programlisting"><a class="link" href="gdk3-Event-Structures.html#GdkEvent" title="union GdkEvent"><span class="returnvalue">GdkEvent</span></a> *          gdk_event_get                       (<em class="parameter"><code><span class="type">void</span></code></em>);</pre>
<p>
Checks all open displays for a <a class="link" href="gdk3-Event-Structures.html#GdkEvent" title="union GdkEvent"><span class="type">GdkEvent</span></a> to process,to be processed
on, fetching events from the windowing system if necessary.
See <a class="link" href="gdk3-GdkDisplay.html#gdk-display-get-event" title="gdk_display_get_event ()"><code class="function">gdk_display_get_event()</code></a>.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody><tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td>the next <a class="link" href="gdk3-Event-Structures.html#GdkEvent" title="union GdkEvent"><span class="type">GdkEvent</span></a> to be processed, or <a href="../glib/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a> if no events
are pending. The returned <a class="link" href="gdk3-Event-Structures.html#GdkEvent" title="union GdkEvent"><span class="type">GdkEvent</span></a> should be freed with <a class="link" href="gdk3-Events.html#gdk-event-free" title="gdk_event_free ()"><code class="function">gdk_event_free()</code></a>.</td>
</tr></tbody>
</table></div>
</div>
<hr>
<div class="refsect2">
<a name="gdk-event-put"></a><h3>gdk_event_put ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span>                gdk_event_put                       (<em class="parameter"><code>const <a class="link" href="gdk3-Event-Structures.html#GdkEvent" title="union GdkEvent"><span class="type">GdkEvent</span></a> *event</code></em>);</pre>
<p>
Appends a copy of the given event onto the front of the event
queue for event-&gt;any.window's display, or the default event
queue if event-&gt;any.window is <a href="../glib/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>. See <a class="link" href="gdk3-GdkDisplay.html#gdk-display-put-event" title="gdk_display_put_event ()"><code class="function">gdk_display_put_event()</code></a>.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody><tr>
<td><p><span class="term"><em class="parameter"><code>event</code></em> :</span></p></td>
<td>a <a class="link" href="gdk3-Event-Structures.html#GdkEvent" title="union GdkEvent"><span class="type">GdkEvent</span></a>.</td>
</tr></tbody>
</table></div>
</div>
<hr>
<div class="refsect2">
<a name="gdk-event-new"></a><h3>gdk_event_new ()</h3>
<pre class="programlisting"><a class="link" href="gdk3-Event-Structures.html#GdkEvent" title="union GdkEvent"><span class="returnvalue">GdkEvent</span></a> *          gdk_event_new                       (<em class="parameter"><code><a class="link" href="gdk3-Events.html#GdkEventType" title="enum GdkEventType"><span class="type">GdkEventType</span></a> type</code></em>);</pre>
<p>
Creates a new event of the given type. All fields are set to 0.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>type</code></em> :</span></p></td>
<td>a <a class="link" href="gdk3-Events.html#GdkEventType" title="enum GdkEventType"><span class="type">GdkEventType</span></a>
</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td>a newly-allocated <a class="link" href="gdk3-Event-Structures.html#GdkEvent" title="union GdkEvent"><span class="type">GdkEvent</span></a>. The returned <a class="link" href="gdk3-Event-Structures.html#GdkEvent" title="union GdkEvent"><span class="type">GdkEvent</span></a>
should be freed with <a class="link" href="gdk3-Events.html#gdk-event-free" title="gdk_event_free ()"><code class="function">gdk_event_free()</code></a>.</td>
</tr>
</tbody>
</table></div>
<p class="since">Since 2.2</p>
</div>
<hr>
<div class="refsect2">
<a name="gdk-event-copy"></a><h3>gdk_event_copy ()</h3>
<pre class="programlisting"><a class="link" href="gdk3-Event-Structures.html#GdkEvent" title="union GdkEvent"><span class="returnvalue">GdkEvent</span></a> *          gdk_event_copy                      (<em class="parameter"><code>const <a class="link" href="gdk3-Event-Structures.html#GdkEvent" title="union GdkEvent"><span class="type">GdkEvent</span></a> *event</code></em>);</pre>
<p>
Copies a <a class="link" href="gdk3-Event-Structures.html#GdkEvent" title="union GdkEvent"><span class="type">GdkEvent</span></a>, copying or incrementing the reference count of the
resources associated with it (e.g. <a class="link" href="gdk3-Windows.html#GdkWindow" title="GdkWindow"><span class="type">GdkWindow</span></a>'s and strings).
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>event</code></em> :</span></p></td>
<td>a <a class="link" href="gdk3-Event-Structures.html#GdkEvent" title="union GdkEvent"><span class="type">GdkEvent</span></a>
</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td>a copy of <em class="parameter"><code>event</code></em>. The returned <a class="link" href="gdk3-Event-Structures.html#GdkEvent" title="union GdkEvent"><span class="type">GdkEvent</span></a> should be freed with
<a class="link" href="gdk3-Events.html#gdk-event-free" title="gdk_event_free ()"><code class="function">gdk_event_free()</code></a>.</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2">
<a name="gdk-event-free"></a><h3>gdk_event_free ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span>                gdk_event_free                      (<em class="parameter"><code><a class="link" href="gdk3-Event-Structures.html#GdkEvent" title="union GdkEvent"><span class="type">GdkEvent</span></a> *event</code></em>);</pre>
<p>
Frees a <a class="link" href="gdk3-Event-Structures.html#GdkEvent" title="union GdkEvent"><span class="type">GdkEvent</span></a>, freeing or decrementing any resources associated with it.
Note that this function should only be called with events returned from
functions such as <a class="link" href="gdk3-Events.html#gdk-event-peek" title="gdk_event_peek ()"><code class="function">gdk_event_peek()</code></a>, <a class="link" href="gdk3-Events.html#gdk-event-get" title="gdk_event_get ()"><code class="function">gdk_event_get()</code></a>, <a class="link" href="gdk3-Events.html#gdk-event-copy" title="gdk_event_copy ()"><code class="function">gdk_event_copy()</code></a>
and <a class="link" href="gdk3-Events.html#gdk-event-new" title="gdk_event_new ()"><code class="function">gdk_event_new()</code></a>.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody><tr>
<td><p><span class="term"><em class="parameter"><code>event</code></em> :</span></p></td>
<td>a <a class="link" href="gdk3-Event-Structures.html#GdkEvent" title="union GdkEvent"><span class="type">GdkEvent</span></a>.</td>
</tr></tbody>
</table></div>
</div>
<hr>
<div class="refsect2">
<a name="gdk-event-get-time"></a><h3>gdk_event_get_time ()</h3>
<pre class="programlisting"><a href="../glib/glib-Basic-Types.html#guint32"><span class="returnvalue">guint32</span></a>             gdk_event_get_time                  (<em class="parameter"><code>const <a class="link" href="gdk3-Event-Structures.html#GdkEvent" title="union GdkEvent"><span class="type">GdkEvent</span></a> *event</code></em>);</pre>
<p>
Returns the time stamp from <em class="parameter"><code>event</code></em>, if there is one; otherwise
returns <a class="link" href="gdk3-Events.html#GDK-CURRENT-TIME:CAPS" title="GDK_CURRENT_TIME"><span class="type">GDK_CURRENT_TIME</span></a>. If <em class="parameter"><code>event</code></em> is <a href="../glib/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>, returns <a class="link" href="gdk3-Events.html#GDK-CURRENT-TIME:CAPS" title="GDK_CURRENT_TIME"><span class="type">GDK_CURRENT_TIME</span></a>.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>event</code></em> :</span></p></td>
<td>a <a class="link" href="gdk3-Event-Structures.html#GdkEvent" title="union GdkEvent"><span class="type">GdkEvent</span></a>
</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td>time stamp field from <em class="parameter"><code>event</code></em>
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2">
<a name="gdk-event-get-state"></a><h3>gdk_event_get_state ()</h3>
<pre class="programlisting"><a href="../glib/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>            gdk_event_get_state                 (<em class="parameter"><code>const <a class="link" href="gdk3-Event-Structures.html#GdkEvent" title="union GdkEvent"><span class="type">GdkEvent</span></a> *event</code></em>,
                                                         <em class="parameter"><code><a class="link" href="gdk3-Windows.html#GdkModifierType" title="enum GdkModifierType"><span class="type">GdkModifierType</span></a> *state</code></em>);</pre>
<p>
If the event contains a "state" field, puts that field in <em class="parameter"><code>state</code></em>. Otherwise
stores an empty state (0). Returns <a href="../glib/glib-Standard-Macros.html#TRUE:CAPS"><code class="literal">TRUE</code></a> if there was a state field
in the event. <em class="parameter"><code>event</code></em> may be <a href="../glib/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>, in which case it's treated
as if the event had no state field.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>event</code></em> :</span></p></td>
<td>a <a class="link" href="gdk3-Event-Structures.html#GdkEvent" title="union GdkEvent"><span class="type">GdkEvent</span></a> or NULL</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>state</code></em> :</span></p></td>
<td>return location for state. <span class="annotation">[<acronym title="Parameter for returning results. Default is transfer full."><span class="acronym">out</span></acronym>]</span>
</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td>
<a href="../glib/glib-Standard-Macros.html#TRUE:CAPS"><code class="literal">TRUE</code></a> if there was a state field in the event</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2">
<a name="gdk-event-get-axis"></a><h3>gdk_event_get_axis ()</h3>
<pre class="programlisting"><a href="../glib/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>            gdk_event_get_axis                  (<em class="parameter"><code>const <a class="link" href="gdk3-Event-Structures.html#GdkEvent" title="union GdkEvent"><span class="type">GdkEvent</span></a> *event</code></em>,
                                                         <em class="parameter"><code><a class="link" href="gdk3-GdkDevice.html#GdkAxisUse" title="enum GdkAxisUse"><span class="type">GdkAxisUse</span></a> axis_use</code></em>,
                                                         <em class="parameter"><code><a href="../glib/glib-Basic-Types.html#gdouble"><span class="type">gdouble</span></a> *value</code></em>);</pre>
<p>
Extract the axis value for a particular axis use from
an event structure.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>event</code></em> :</span></p></td>
<td>a <a class="link" href="gdk3-Event-Structures.html#GdkEvent" title="union GdkEvent"><span class="type">GdkEvent</span></a>
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>axis_use</code></em> :</span></p></td>
<td>the axis use to look for</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>value</code></em> :</span></p></td>
<td>location to store the value found. <span class="annotation">[<acronym title="Parameter for returning results. Default is transfer full."><span class="acronym">out</span></acronym>]</span>
</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td>如果指定的axis 可以找到，返回<a href="../glib/glib-Standard-Macros.html#TRUE:CAPS"><code class="literal">TRUE</code></a>，否则返回<a href="../glib/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>。</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2">
<a name="gdk-event-get-coords"></a><h3>gdk_event_get_coords ()</h3>
<pre class="programlisting"><a href="../glib/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>            gdk_event_get_coords                (<em class="parameter"><code>const <a class="link" href="gdk3-Event-Structures.html#GdkEvent" title="union GdkEvent"><span class="type">GdkEvent</span></a> *event</code></em>,
                                                         <em class="parameter"><code><a href="../glib/glib-Basic-Types.html#gdouble"><span class="type">gdouble</span></a> *x_win</code></em>,
                                                         <em class="parameter"><code><a href="../glib/glib-Basic-Types.html#gdouble"><span class="type">gdouble</span></a> *y_win</code></em>);</pre>
<p>
Extract the event window relative x/y coordinates from an event.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>event</code></em> :</span></p></td>
<td>a <a class="link" href="gdk3-Event-Structures.html#GdkEvent" title="union GdkEvent"><span class="type">GdkEvent</span></a>
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>x_win</code></em> :</span></p></td>
<td>location to put event window x coordinate. <span class="annotation">[<acronym title="Parameter for returning results. Default is transfer full."><span class="acronym">out</span></acronym>]</span>
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>y_win</code></em> :</span></p></td>
<td>location to put event window y coordinate. <span class="annotation">[<acronym title="Parameter for returning results. Default is transfer full."><span class="acronym">out</span></acronym>]</span>
</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td>
<a href="../glib/glib-Standard-Macros.html#TRUE:CAPS"><code class="literal">TRUE</code></a> if the event delivered event window coordinates</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2">
<a name="gdk-event-get-root-coords"></a><h3>gdk_event_get_root_coords ()</h3>
<pre class="programlisting"><a href="../glib/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>            gdk_event_get_root_coords           (<em class="parameter"><code>const <a class="link" href="gdk3-Event-Structures.html#GdkEvent" title="union GdkEvent"><span class="type">GdkEvent</span></a> *event</code></em>,
                                                         <em class="parameter"><code><a href="../glib/glib-Basic-Types.html#gdouble"><span class="type">gdouble</span></a> *x_root</code></em>,
                                                         <em class="parameter"><code><a href="../glib/glib-Basic-Types.html#gdouble"><span class="type">gdouble</span></a> *y_root</code></em>);</pre>
<p>
Extract the root window relative x/y coordinates from an event.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>event</code></em> :</span></p></td>
<td>a <a class="link" href="gdk3-Event-Structures.html#GdkEvent" title="union GdkEvent"><span class="type">GdkEvent</span></a>
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>x_root</code></em> :</span></p></td>
<td>location to put root window x coordinate. <span class="annotation">[<acronym title="Parameter for returning results. Default is transfer full."><span class="acronym">out</span></acronym>]</span>
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>y_root</code></em> :</span></p></td>
<td>location to put root window y coordinate. <span class="annotation">[<acronym title="Parameter for returning results. Default is transfer full."><span class="acronym">out</span></acronym>]</span>
</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td>
<a href="../glib/glib-Standard-Macros.html#TRUE:CAPS"><code class="literal">TRUE</code></a> if the event delivered root window coordinates</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2">
<a name="gdk-event-request-motions"></a><h3>gdk_event_request_motions ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span>                gdk_event_request_motions           (<em class="parameter"><code>const <a class="link" href="gdk3-Event-Structures.html#GdkEventMotion" title="struct GdkEventMotion"><span class="type">GdkEventMotion</span></a> *event</code></em>);</pre>
<p>
Request more motion notifies if <em class="parameter"><code>event</code></em> is a motion notify hint event.
</p>
<p>
This function should be used instead of <a class="link" href="gdk3-Windows.html#gdk-window-get-pointer" title="gdk_window_get_pointer ()"><code class="function">gdk_window_get_pointer()</code></a> to
request further motion notifies, because it also works for extension
events where motion notifies are provided for devices other than the
core pointer. Coordinate extraction, processing and requesting more
motion events from a <a class="link" href="gdk3-Events.html#GDK-MOTION-NOTIFY:CAPS"><code class="literal">GDK_MOTION_NOTIFY</code></a> event usually works like this:
</p>
<p>
</p>
<div class="informalexample"><pre class="programlisting">
{
  /* motion_event handler */
  x = motion_event-&gt;x;
  y = motion_event-&gt;y;
  /* handle (x,y) motion */
  gdk_event_request_motions (motion_event); /* handles is_hint events */
}
</pre></div>
<p>
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody><tr>
<td><p><span class="term"><em class="parameter"><code>event</code></em> :</span></p></td>
<td>a valid <a class="link" href="gdk3-Event-Structures.html#GdkEvent" title="union GdkEvent"><span class="type">GdkEvent</span></a>
</td>
</tr></tbody>
</table></div>
<p class="since">Since 2.12</p>
</div>
<hr>
<div class="refsect2">
<a name="gdk-events-get-angle"></a><h3>gdk_events_get_angle ()</h3>
<pre class="programlisting"><a href="../glib/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>            gdk_events_get_angle                (<em class="parameter"><code><a class="link" href="gdk3-Event-Structures.html#GdkEvent" title="union GdkEvent"><span class="type">GdkEvent</span></a> *event1</code></em>,
                                                         <em class="parameter"><code><a class="link" href="gdk3-Event-Structures.html#GdkEvent" title="union GdkEvent"><span class="type">GdkEvent</span></a> *event2</code></em>,
                                                         <em class="parameter"><code><a href="../glib/glib-Basic-Types.html#gdouble"><span class="type">gdouble</span></a> *angle</code></em>);</pre>
<p>
If both events contain X/Y information, this function will return <a href="../glib/glib-Standard-Macros.html#TRUE:CAPS"><code class="literal">TRUE</code></a>
and return in <em class="parameter"><code>angle</code></em> the relative angle from <em class="parameter"><code>event1</code></em> to <em class="parameter"><code>event2</code></em>. The rotation
direction for positive angles is from the positive X axis towards the positive
Y axis.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>event1</code></em> :</span></p></td>
<td>first <a class="link" href="gdk3-Event-Structures.html#GdkEvent" title="union GdkEvent"><span class="type">GdkEvent</span></a>
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>event2</code></em> :</span></p></td>
<td>second <a class="link" href="gdk3-Event-Structures.html#GdkEvent" title="union GdkEvent"><span class="type">GdkEvent</span></a>
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>angle</code></em> :</span></p></td>
<td>return location for the relative angle between both events. <span class="annotation">[<acronym title="Parameter for returning results. Default is transfer full."><span class="acronym">out</span></acronym>]</span>
</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td>
<a href="../glib/glib-Standard-Macros.html#TRUE:CAPS"><code class="literal">TRUE</code></a> if the angle could be calculated.</td>
</tr>
</tbody>
</table></div>
<p class="since">Since 3.0</p>
</div>
<hr>
<div class="refsect2">
<a name="gdk-events-get-center"></a><h3>gdk_events_get_center ()</h3>
<pre class="programlisting"><a href="../glib/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>            gdk_events_get_center               (<em class="parameter"><code><a class="link" href="gdk3-Event-Structures.html#GdkEvent" title="union GdkEvent"><span class="type">GdkEvent</span></a> *event1</code></em>,
                                                         <em class="parameter"><code><a class="link" href="gdk3-Event-Structures.html#GdkEvent" title="union GdkEvent"><span class="type">GdkEvent</span></a> *event2</code></em>,
                                                         <em class="parameter"><code><a href="../glib/glib-Basic-Types.html#gdouble"><span class="type">gdouble</span></a> *x</code></em>,
                                                         <em class="parameter"><code><a href="../glib/glib-Basic-Types.html#gdouble"><span class="type">gdouble</span></a> *y</code></em>);</pre>
<p>
If both events contain X/Y information, the center of both coordinates
will be returned in <em class="parameter"><code>x</code></em> and <em class="parameter"><code>y</code></em>.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>event1</code></em> :</span></p></td>
<td>first <a class="link" href="gdk3-Event-Structures.html#GdkEvent" title="union GdkEvent"><span class="type">GdkEvent</span></a>
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>event2</code></em> :</span></p></td>
<td>second <a class="link" href="gdk3-Event-Structures.html#GdkEvent" title="union GdkEvent"><span class="type">GdkEvent</span></a>
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>x</code></em> :</span></p></td>
<td>return location for the X coordinate of the center. <span class="annotation">[<acronym title="Parameter for returning results. Default is transfer full."><span class="acronym">out</span></acronym>]</span>
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>y</code></em> :</span></p></td>
<td>return location for the Y coordinate of the center. <span class="annotation">[<acronym title="Parameter for returning results. Default is transfer full."><span class="acronym">out</span></acronym>]</span>
</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td>
<a href="../glib/glib-Standard-Macros.html#TRUE:CAPS"><code class="literal">TRUE</code></a> if the center could be calculated.</td>
</tr>
</tbody>
</table></div>
<p class="since">Since 3.0</p>
</div>
<hr>
<div class="refsect2">
<a name="gdk-events-get-distance"></a><h3>gdk_events_get_distance ()</h3>
<pre class="programlisting"><a href="../glib/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>            gdk_events_get_distance             (<em class="parameter"><code><a class="link" href="gdk3-Event-Structures.html#GdkEvent" title="union GdkEvent"><span class="type">GdkEvent</span></a> *event1</code></em>,
                                                         <em class="parameter"><code><a class="link" href="gdk3-Event-Structures.html#GdkEvent" title="union GdkEvent"><span class="type">GdkEvent</span></a> *event2</code></em>,
                                                         <em class="parameter"><code><a href="../glib/glib-Basic-Types.html#gdouble"><span class="type">gdouble</span></a> *distance</code></em>);</pre>
<p>
If both events have X/Y information, the distance between both coordinates
(as in a straight line going from <em class="parameter"><code>event1</code></em> to <em class="parameter"><code>event2</code></em>) will be returned.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>event1</code></em> :</span></p></td>
<td>first <a class="link" href="gdk3-Event-Structures.html#GdkEvent" title="union GdkEvent"><span class="type">GdkEvent</span></a>
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>event2</code></em> :</span></p></td>
<td>second <a class="link" href="gdk3-Event-Structures.html#GdkEvent" title="union GdkEvent"><span class="type">GdkEvent</span></a>
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>distance</code></em> :</span></p></td>
<td>return location for the distance. <span class="annotation">[<acronym title="Parameter for returning results. Default is transfer full."><span class="acronym">out</span></acronym>]</span>
</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td>
<a href="../glib/glib-Standard-Macros.html#TRUE:CAPS"><code class="literal">TRUE</code></a> if the distance could be calculated.</td>
</tr>
</tbody>
</table></div>
<p class="since">Since 3.0</p>
</div>
<hr>
<div class="refsect2">
<a name="gdk-event-handler-set"></a><h3>gdk_event_handler_set ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span>                gdk_event_handler_set               (<em class="parameter"><code><a class="link" href="gdk3-Events.html#GdkEventFunc" title="GdkEventFunc ()"><span class="type">GdkEventFunc</span></a> func</code></em>,
                                                         <em class="parameter"><code><a href="../glib/glib-Basic-Types.html#gpointer"><span class="type">gpointer</span></a> data</code></em>,
                                                         <em class="parameter"><code><a href="../glib/glib-Datasets.html#GDestroyNotify"><span class="type">GDestroyNotify</span></a> notify</code></em>);</pre>
<p>
Sets the function to call to handle all events from GDK.
</p>
<p>
Note that GTK+ uses this to install its own event handler, so it is
usually not useful for GTK+ applications. (Although an application
can call this function then call <code class="function">gtk_main_do_event()</code> to pass
events to GTK+.)
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>func</code></em> :</span></p></td>
<td>the function to call to handle events from GDK.</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>data</code></em> :</span></p></td>
<td>传递给这个函数的用户数据</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>notify</code></em> :</span></p></td>
<td>the function to call when the handler function is removed, i.e. when
<a class="link" href="gdk3-Events.html#gdk-event-handler-set" title="gdk_event_handler_set ()"><code class="function">gdk_event_handler_set()</code></a> is called with another event handler.</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2">
<a name="GdkEventFunc"></a><h3>GdkEventFunc ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span>                (*GdkEventFunc)                     (<em class="parameter"><code><a class="link" href="gdk3-Event-Structures.html#GdkEvent" title="union GdkEvent"><span class="type">GdkEvent</span></a> *event</code></em>,
                                                         <em class="parameter"><code><a href="../glib/glib-Basic-Types.html#gpointer"><span class="type">gpointer</span></a> data</code></em>);</pre>
<p>
Specifies the type of function passed to <a class="link" href="gdk3-Events.html#gdk-event-handler-set" title="gdk_event_handler_set ()"><code class="function">gdk_event_handler_set()</code></a> to
handle all GDK events.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>event</code></em> :</span></p></td>
<td>the <a class="link" href="gdk3-Event-Structures.html#GdkEvent" title="union GdkEvent"><span class="type">GdkEvent</span></a> to process.</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>data</code></em> :</span></p></td>
<td>user data set when the event handler was installed with
<a class="link" href="gdk3-Events.html#gdk-event-handler-set" title="gdk_event_handler_set ()"><code class="function">gdk_event_handler_set()</code></a>. <span class="annotation">[<acronym title="This parameter is a 'user_data', for callbacks; many bindings can pass NULL here."><span class="acronym">closure</span></acronym>]</span>
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2">
<a name="gdk-get-show-events"></a><h3>gdk_get_show_events ()</h3>
<pre class="programlisting"><a href="../glib/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>            gdk_get_show_events                 (<em class="parameter"><code><span class="type">void</span></code></em>);</pre>
<p>
Gets whether event debugging output is enabled.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody><tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td>
<a href="../glib/glib-Standard-Macros.html#TRUE:CAPS"><code class="literal">TRUE</code></a> if event debugging output is enabled.</td>
</tr></tbody>
</table></div>
</div>
<hr>
<div class="refsect2">
<a name="gdk-set-show-events"></a><h3>gdk_set_show_events ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span>                gdk_set_show_events                 (<em class="parameter"><code><a href="../glib/glib-Basic-Types.html#gboolean"><span class="type">gboolean</span></a> show_events</code></em>);</pre>
<p>
Sets whether a trace of received events is output.
Note that GTK+ must be compiled with debugging (that is,
configured using the <code class="option">--enable-debug</code> option)
to use this option.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody><tr>
<td><p><span class="term"><em class="parameter"><code>show_events</code></em> :</span></p></td>
<td>
<a href="../glib/glib-Standard-Macros.html#TRUE:CAPS"><code class="literal">TRUE</code></a> to output event debugging information.</td>
</tr></tbody>
</table></div>
</div>
<hr>
<div class="refsect2">
<a name="gdk-event-set-screen"></a><h3>gdk_event_set_screen ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span>                gdk_event_set_screen                (<em class="parameter"><code><a class="link" href="gdk3-Event-Structures.html#GdkEvent" title="union GdkEvent"><span class="type">GdkEvent</span></a> *event</code></em>,
                                                         <em class="parameter"><code><a class="link" href="gdk3-GdkScreen.html#GdkScreen" title="GdkScreen"><span class="type">GdkScreen</span></a> *screen</code></em>);</pre>
<p>
Sets the screen for <em class="parameter"><code>event</code></em> to <em class="parameter"><code>screen</code></em>. The event must
have been allocated by GTK+, for instance, by
<a class="link" href="gdk3-Events.html#gdk-event-copy" title="gdk_event_copy ()"><code class="function">gdk_event_copy()</code></a>.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>event</code></em> :</span></p></td>
<td>a <a class="link" href="gdk3-Event-Structures.html#GdkEvent" title="union GdkEvent"><span class="type">GdkEvent</span></a>
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>screen</code></em> :</span></p></td>
<td>a <a class="link" href="gdk3-GdkScreen.html#GdkScreen" title="GdkScreen"><span class="type">GdkScreen</span></a>
</td>
</tr>
</tbody>
</table></div>
<p class="since">Since 2.2</p>
</div>
<hr>
<div class="refsect2">
<a name="gdk-event-get-screen"></a><h3>gdk_event_get_screen ()</h3>
<pre class="programlisting"><a class="link" href="gdk3-GdkScreen.html#GdkScreen" title="GdkScreen"><span class="returnvalue">GdkScreen</span></a> *         gdk_event_get_screen                (<em class="parameter"><code>const <a class="link" href="gdk3-Event-Structures.html#GdkEvent" title="union GdkEvent"><span class="type">GdkEvent</span></a> *event</code></em>);</pre>
<p>
Returns the screen for the event. The screen is
typically the screen for <code class="literal">event-&gt;any.window</code>, but
for events such as mouse events, it is the screen
where the pointer was when the event occurs -
that is, the screen which has the root window 
to which <code class="literal">event-&gt;motion.x_root</code> and
<code class="literal">event-&gt;motion.y_root</code> are relative.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>event</code></em> :</span></p></td>
<td>a <a class="link" href="gdk3-Event-Structures.html#GdkEvent" title="union GdkEvent"><span class="type">GdkEvent</span></a>
</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td>the screen for the event. <span class="annotation">[<acronym title="Don't free data after the code is done."><span class="acronym">transfer none</span></acronym>]</span>
</td>
</tr>
</tbody>
</table></div>
<p class="since">Since 2.2</p>
</div>
<hr>
<div class="refsect2">
<a name="gdk-event-get-device"></a><h3>gdk_event_get_device ()</h3>
<pre class="programlisting"><a class="link" href="gdk3-GdkDevice.html#GdkDevice" title="GdkDevice"><span class="returnvalue">GdkDevice</span></a> *         gdk_event_get_device                (<em class="parameter"><code>const <a class="link" href="gdk3-Event-Structures.html#GdkEvent" title="union GdkEvent"><span class="type">GdkEvent</span></a> *event</code></em>);</pre>
<p>
If the event contains a "device" field, this function will return
it, else it will return <a href="../glib/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>event</code></em> :</span></p></td>
<td>a <a class="link" href="gdk3-Event-Structures.html#GdkEvent" title="union GdkEvent"><span class="type">GdkEvent</span></a>.</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td>a <a class="link" href="gdk3-GdkDevice.html#GdkDevice" title="GdkDevice"><span class="type">GdkDevice</span></a>, or <a href="../glib/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>. <span class="annotation">[<acronym title="Don't free data after the code is done."><span class="acronym">transfer none</span></acronym>]</span>
</td>
</tr>
</tbody>
</table></div>
<p class="since">Since 3.0</p>
</div>
<hr>
<div class="refsect2">
<a name="gdk-event-set-device"></a><h3>gdk_event_set_device ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span>                gdk_event_set_device                (<em class="parameter"><code><a class="link" href="gdk3-Event-Structures.html#GdkEvent" title="union GdkEvent"><span class="type">GdkEvent</span></a> *event</code></em>,
                                                         <em class="parameter"><code><a class="link" href="gdk3-GdkDevice.html#GdkDevice" title="GdkDevice"><span class="type">GdkDevice</span></a> *device</code></em>);</pre>
<p>
Sets the device for <em class="parameter"><code>event</code></em> to <em class="parameter"><code>device</code></em>. The event must
have been allocated by GTK+, for instance, by
<a class="link" href="gdk3-Events.html#gdk-event-copy" title="gdk_event_copy ()"><code class="function">gdk_event_copy()</code></a>.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>event</code></em> :</span></p></td>
<td>a <a class="link" href="gdk3-Event-Structures.html#GdkEvent" title="union GdkEvent"><span class="type">GdkEvent</span></a>
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>device</code></em> :</span></p></td>
<td>a <a class="link" href="gdk3-GdkDevice.html#GdkDevice" title="GdkDevice"><span class="type">GdkDevice</span></a>
</td>
</tr>
</tbody>
</table></div>
<p class="since">Since 3.0</p>
</div>
<hr>
<div class="refsect2">
<a name="gdk-event-get-source-device"></a><h3>gdk_event_get_source_device ()</h3>
<pre class="programlisting"><a class="link" href="gdk3-GdkDevice.html#GdkDevice" title="GdkDevice"><span class="returnvalue">GdkDevice</span></a> *         gdk_event_get_source_device         (<em class="parameter"><code>const <a class="link" href="gdk3-Event-Structures.html#GdkEvent" title="union GdkEvent"><span class="type">GdkEvent</span></a> *event</code></em>);</pre>
<p>
This function returns the hardware (slave) <a class="link" href="gdk3-GdkDevice.html#GdkDevice" title="GdkDevice"><span class="type">GdkDevice</span></a> that has
triggered the event, falling back to the virtual (master) device
(as in <a class="link" href="gdk3-Events.html#gdk-event-get-device" title="gdk_event_get_device ()"><code class="function">gdk_event_get_device()</code></a>) if the event wasn't caused by
interaction with a hardware device. This may happen for example
in synthesized crossing events after a <a class="link" href="gdk3-Windows.html#GdkWindow" title="GdkWindow"><span class="type">GdkWindow</span></a> updates its
geometry or a grab is acquired/released.
</p>
<p>
If the event does not contain a device field, this function will
return <a href="../glib/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>event</code></em> :</span></p></td>
<td>a <a class="link" href="gdk3-Event-Structures.html#GdkEvent" title="union GdkEvent"><span class="type">GdkEvent</span></a>
</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td>a <a class="link" href="gdk3-GdkDevice.html#GdkDevice" title="GdkDevice"><span class="type">GdkDevice</span></a>, or <a href="../glib/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>. <span class="annotation">[<acronym title="Don't free data after the code is done."><span class="acronym">transfer none</span></acronym>]</span>
</td>
</tr>
</tbody>
</table></div>
<p class="since">Since 3.0</p>
</div>
<hr>
<div class="refsect2">
<a name="gdk-event-set-source-device"></a><h3>gdk_event_set_source_device ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span>                gdk_event_set_source_device         (<em class="parameter"><code><a class="link" href="gdk3-Event-Structures.html#GdkEvent" title="union GdkEvent"><span class="type">GdkEvent</span></a> *event</code></em>,
                                                         <em class="parameter"><code><a class="link" href="gdk3-GdkDevice.html#GdkDevice" title="GdkDevice"><span class="type">GdkDevice</span></a> *device</code></em>);</pre>
<p>
Sets the slave device for <em class="parameter"><code>event</code></em> to <em class="parameter"><code>device</code></em>.
</p>
<p>
The event must have been allocated by GTK+,
for instance by <a class="link" href="gdk3-Events.html#gdk-event-copy" title="gdk_event_copy ()"><code class="function">gdk_event_copy()</code></a>.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>event</code></em> :</span></p></td>
<td>a <a class="link" href="gdk3-Event-Structures.html#GdkEvent" title="union GdkEvent"><span class="type">GdkEvent</span></a>
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>device</code></em> :</span></p></td>
<td>a <a class="link" href="gdk3-GdkDevice.html#GdkDevice" title="GdkDevice"><span class="type">GdkDevice</span></a>
</td>
</tr>
</tbody>
</table></div>
<p class="since">Since 3.0</p>
</div>
<hr>
<div class="refsect2">
<a name="gdk-setting-get"></a><h3>gdk_setting_get ()</h3>
<pre class="programlisting"><a href="../glib/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>            gdk_setting_get                     (<em class="parameter"><code>const <a href="../glib/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *name</code></em>,
                                                         <em class="parameter"><code><a href="../gobject/gobject-Generic-values.html#GValue"><span class="type">GValue</span></a> *value</code></em>);</pre>
<p>
Obtains a desktop-wide setting, such as the double-click time,
for the default screen. See <a class="link" href="gdk3-GdkScreen.html#gdk-screen-get-setting" title="gdk_screen_get_setting ()"><code class="function">gdk_screen_get_setting()</code></a>.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>name</code></em> :</span></p></td>
<td>the name of the setting.</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>value</code></em> :</span></p></td>
<td>location to store the value of the setting.</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td>
<a href="../glib/glib-Standard-Macros.html#TRUE:CAPS"><code class="literal">TRUE</code></a> if the setting existed and a value was stored
in <em class="parameter"><code>value</code></em>, <a href="../glib/glib-Standard-Macros.html#FALSE:CAPS"><code class="literal">FALSE</code></a> otherwise.</td>
</tr>
</tbody>
</table></div>
</div>
</div>
<div class="refsect1">
<a name="gdk3-Events.see-also"></a><h2>See Also</h2>
Event Structures
</div>
</div>
<div class="footer">
<hr>
          Generated by GTK-Doc V1.17</div>
</body>
</html>